package com.example.springboot.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 文章表
 * </p>
 *
 * @author
 *
 */
@Getter
@Setter
@ApiModel(value = "Articles对象", description = "文章表")
public class Articles implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("文章ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("文章标题")
    private String title;

    @ApiModelProperty("文章摘要")
    private String summary;

    @ApiModelProperty("文章内容")
    private String content;
    @ApiModelProperty("正文图URL")
    private String cover;
    @ApiModelProperty("封面图URL")
    private String img;

    @ApiModelProperty("标签")
    private String tags;
    @ApiModelProperty("作者ID")
    private Integer authorId;

    @ApiModelProperty("分类ID")
    private Integer categoryId;

    @ApiModelProperty("状态：0草稿，1已发布，2待审核，-1已删除")
    private Integer status;

    @ApiModelProperty("浏览量")
    private Integer views;

    @ApiModelProperty("点赞数")
    private Integer likes;

    @ApiModelProperty("评论数")
    private Integer comments;

    @ApiModelProperty("收藏数")
    private Integer collections;

    @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime time;


}
